-- GENERATED SPELL FOR [Azaloth] --


function spell0_21506(pUnit, Event) --@Cleave,n/a--
pUnit:FullCastSpellOnTarget(40504,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_21506', 619, 1)
end

function spell1_21506(pUnit, Event) --@Cripple,n/a--
pUnit:FullCastSpellOnTarget(11443,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_21506', 18000, 1)
end

function spell2_21506(pUnit, Event) --@Rain of Fire,n/a--
pUnit:FullCastSpellOnTarget(38741,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_21506', 9000, 1)
end

function spell3_21506(pUnit, Event) --@War Stomp,Self--
pUnit:FullCastSpellOnTarget(38750,pUnit)
pUnit:RegisterEvent('Sorts_21506', 5000, 1)
end

function Sorts_21506(pUnit, Event)
local choix_sorts_21506 = math.random(0, 3)
if choix_sorts_21506 == 0 then
pUnit:RegisterEvent('spell0_21506', 1, 1)
end
if choix_sorts_21506 == 1 then
pUnit:RegisterEvent('spell1_21506', 1, 1)
end
if choix_sorts_21506 == 2 then
pUnit:RegisterEvent('spell2_21506', 1, 1)
end
if choix_sorts_21506 == 3 then
pUnit:RegisterEvent('spell3_21506', 1, 1)
end
end

function mob21506_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_21506', math.random(1500, 3000), 1)
end

function mob21506_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21506_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21506_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(21506, 1, 'mob21506_Action')
RegisterUnitEvent(21506, 2, 'mob21506_Leave')
RegisterUnitEvent(21506, 3, 'mob21506_Kill')
RegisterUnitEvent(21506, 4, 'mob21506_Die')
